package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * 院内科室类型
 */
@EnumDescription("院内科室类型")
public enum HospitalDeptTypeEnum implements DictEnum {

	//--------------------start-----------------

	INTERNAL_MEDICINE("01", "内科"),

	SURGICAL("02", "外科"),

	THE_DEPARTMENT_OF_OBSTETRICS_AND_GYNECOLOGY("03", "妇产科"),

	MALE("04", "男科"),

	PEDIATRIC("05", "儿科"),

	ENT("06", "五官科"),

	ONCOLOGY("07", "肿瘤科"),

	DERMATOLOGY("08", "皮肤科"),

	REGIONS("09", "中医科"),

	INFECTIOUS_DEPARTMENT("10", "传染科"),

	MENTAL_DIVISION("11", "精神心理科"),

	COSMETIC_SURGERY_BRANCH("12", "整形美容科"),

	NUTRITION("13", "营养科"),

	//--------------------end-------------------
	;

	private String key;

	private String value;

	HospitalDeptTypeEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}

	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(HospitalDeptTypeEnum.class, value);
		}
	}
}
